using Circus.CodeEditor;

using System;
using System.ComponentModel;
namespace Circus.Syntax.CodeCompletion
{
	public class QuickInfoItem : IQuickInfoItem, IComparable
	{
		private string text = string.Empty;
		public virtual string Text
		{
			get
			{
				return this.text;
			}
			set
			{
				if (this.text != value)
				{
					this.text = value;
					this.OnTextChanged();
				}
			}
		}
	
		protected virtual void OnTextChanged()
		{
		}
		public QuickInfoItem(string text)
		{
			this.text = text;
		}
		public virtual int CompareTo(object value)
		{
			if (value is IQuickInfoItem)
			{
				return string.Compare(this.text, ((IQuickInfoItem)value).Text, true);
			}
			throw new ArgumentException();
		}
	}
}
